@import '../../styles/global.less';
.k-select {
  display: inline-block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  vertical-align: middle;
  color: #495060;
  font-size: 12px;
  position: relative;
  outline: none;
  &:focus {
    .k-select-selection {
      border: 1px solid @border-color;
      box-shadow: 0 0 5px fade(@main, 75%);
    }
  }
  &-selection {
    border-radius: @radius;
    overflow: hidden;
    display: block;
    box-sizing: border-box;
    outline: 0;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    cursor: pointer;
    position: relative;
    background-color: #fff;
    border: 1px solid @border-color;
    transition: border-color .2s ease-in-out, background-color .2s ease-in-out;
    min-height: 32px;
    position: relative;
  }
  &-search-wrap {
    position: absolute;
    left: 5px;
    z-index: 1;
    top: 50%;
    background: none;
    transform: translateY(-50%);
    .k-select-search {
      // border: 1px solid #eee;
      border: none;
      width: 0.75em;
      min-width: 0.75em;
      height: 20px;
      padding: 0;
      background: none;
      outline: none;
      font-size: 12px;
    }
  }
  &-labels {
    padding: 3px 32px 0 0;
    overflow: hidden;
    .k-select-tag {
      padding: 2px 22px 2px 5px;
      border: 1px solid @border-color;
      border-radius: @radius;
      margin: 0 0 3px 5px;
      float: left;
      position: relative;
      line-height: 18px;
      overflow: hidden;
      .k-icon {
        position: absolute;
        right: 3px;
        font-size: 16px;
        text-align: center;
        display: block;
        top: 50%;
        transform: translateY(-50%);
        &:hover {
          color: @danger;
        }
      }
    }
    .k-select-search-wrap {
      float: left;
      position: relative;
      transform: none;
      top: 0;
      // .k-select-search {
      //   // border: none;
      //   top: 50%;
      //   transform: translateY(-50%);
      //   z-index: 10;
      //   position: absolute;
      // }
    }
  }
  .k-select-search-mirror {
    opacity: 0;
    white-space: pre;
    pointer-events: none;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 1;
    font-size: 12px;
  }
  .k-select-placeholder {
    position: absolute;
    left: 0;
    top: 0;
    font-size: 12px;
    z-index: 0;
    padding-left: 9px;
    padding-right: 30px;
    overflow: hidden;
    text-overflow: ellipsis;
    color: @disable-color;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    max-width: 100%;
    box-sizing: border-box;
  }
  /*  .k-select-placeholder {
      color: #888;
   } */
  /* .k-select-placeholder, */
  .k-select-label {
    display: block;
    height: 30px;
    line-height: 30px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-top: -1px;
    padding-left: 8px;
    padding-right: 32px;
    border: none;
    background: transparent;
    box-sizing: border-box;
    width: 100%;
    cursor: pointer;
    font-size: 12px;
  }
  .k-select-arrow {
    // font-size: 18px;
    position: absolute;
    top: 50%;
    right: 9px;
    font-size: 14px;
    box-sizing: border-box;
    transform: translateY(-50%) rotate(0deg);
    transform-origin: center;
    transition: transform .3s ease-in-out;
    color: @icon-color;
  }
  .k-select-clearable {
    position: absolute;
    top: 50%;
    right: 9px;
    transform: translateY(-50%);
    display: none;
    font-size: 15px;
    color: @icon-color;
    &:hover {
      color: @color;
    }
  }
  &:hover, &:focus {
    .k-select-selection {
      border-color: @main;
    }
  }
}

.k-select-dropdown {
  user-select: none;
  border-radius: @radius;
  width: inherit;
  max-height: 200px;
  overflow: auto;
  background-color: #fff;
  box-sizing: border-box;
  box-shadow: 0 1px 6px rgba(0, 0, 0, .2);
  position: absolute;
  z-index: 1003;
  ul {
    padding: 0;
    margin: 0;
    list-style: none;
    left: 0;
  }
  .k-select-loading {
    padding: 10px;
    font-size: 12px;
    .k-icon {
      font-size: 14px;
    }
    span {
      margin-left: 8px;
    }
  }
  .k-select-item {
    margin: 0;
    line-height: normal;
    padding: 7px 16px;
    clear: both;
    color: #495060;
    font-size: 12px !important;
    white-space: nowrap;
    list-style: none;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    position: relative;
    &:hover {
      background: @light;
    }
    .k-icon {
      position: absolute;
      top: 0;
      right: 9px;
      font-size: 15px;
      top: 50%;
      transform: translateY(-50%);
      display: none;
      color: @icon-color;
    }
    &:hover .k-icon, .k-icon {
      display: block;
    }
  }
  .k-select-item-selected {
    background: tint(@main,80%);
    color: @main;
    font-weight: 500;
    &:hover {
      background: tint(@main,80%);
    }
    .k-icon {
      color: @main;
      display: block;
    }
  }
  .k-select-item-disabled {
    background: @disable-back;
    color: @disable-color;
    cursor: not-allowed;
  }
  // &:hover{
  //     overflow: auto;
  // }
  // &::-webkit-scrollbar {
  // width: 8px;
  // height: 8px;
  // border-left: 1px solid @border-color;
  // padding: 0 2px;
  // background: rgba(211, 211, 211, 0.568);
  // }
  // &::-webkit-scrollbar-thumb {
  // background: #ddd;
  // border-radius: 3px;
  // }
}

.k-select-dropdown-multiple {
  .k-select-item {
    padding-right: 31px;
  }
}

.k-select-sm {
  .k-select-selection {
    min-height: 25px;
  }
  .k-select-arrow {
    font-size: 12px;
    right: 5px;
  }
  .k-select-clearable {
    right: 5px;
    font-size: 12px;
  }
  .k-select-label {
    line-height: 23px;
    height: 23px;
    padding-right: 23px;
    font-size: 12px;
  }
  .k-select-placeholder {
    font-size: 12px;
  }
  .k-select-labels {
    padding: 2px 23px 0 0;
    .k-select-tag {
      padding: 2px 22px 2px 5px;
      margin: 0 0 3px 4px;
      line-height: 1;
      .k-icon {
        font-size: 14px;
      }
    }
    .k-select-search {
      height: 18px;
      line-height: 18px;
      left: 0;
      float: left;
    }
  }
}

.k-select-lg {
  .k-select-placeholder {
    font-size: 14px;
  }
  .k-select-selection {
    font-size: 14px;
    min-height: 40px;
  }
  .k-select-arrow {
    font-size: 18px;
    right: 10px;
  }
  .k-select-clearable {
    right: 10px;
    font-size: 18px;
  }
  .k-select-label {
    line-height: 38px;
    height: 38px;
    padding-right: 32px;
    font-size: 14px;
  }
  .k-select-labels {
    padding: 4px 32px 0 0;
    .k-select-tag {
      padding: 8px 28px 8px 5px;
      margin: 0 0 3px 4px;
      line-height: 1;
      .k-icon {
        font-size: 22px;
      }
    }
    .k-select-search {
      height: 18px;
      line-height: 18px;
      left: 0;
      float: left;
    }
  }
}

.k-select-open {
  .k-select-selection {
    border-color: @main; // border-color: #3bb4f2;
    // box-shadow: 0 0 5px rgba(59, 180, 242, 0.55);
    box-shadow: 0 0 5px fade(@main, 75%);
  }
  .k-select-arrow {
    transform: translateY(-50%) rotate(180deg);
  }
}

.k-select-disabled {
  color: @disable-color;
  .k-select-label {
    cursor: not-allowed;
  }
  .k-select-selection {
    background: @disable-back;
    cursor: not-allowed;
  }
  .k-select-arrow {
    color: @disable-border;
  }
  &:hover .k-select-selection {
    border-color: @disable-border;
  }
}

.k-select-has-clear {
  &:hover {
    .k-select-clearable {
      display: block;
    }
    .k-select-arrow {
      display: none;
    }
  }
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0, 0);
  }
  to {
    opacity: 1;
    transform: scale(1, 1);
  }
}

@keyframes zoomOut {
  from {
    opacity: 1;
    transform: scale(1, 1);
  }
  to {
    opacity: 0;
    transform: scale(0, 0);
  }
}

.k-select-tag-enter-active {
  animation: zoomIn .2s ease-out;
}

.k-select-tag-leave-active {
  animation: zoomOut .2s ease-out;
}